import type { ClozeScheme } from '../../interface'
import styles from './index.module.less'

const FileBox = (props: { scheme: ClozeScheme; answers: any; idx: number }) => {
    const { scheme, answers, idx } = props
    const { properties } = scheme || {}

    return (
        <div className={styles.file_box}>
            <div className={styles.question}>
                {idx}、{properties?.title}
            </div>
            {answers?.fileList.map((item: any) => {
                const { uid, name } = item || {}
                return (
                    <p key={uid} className={styles.file_name}>
                        {name}
                    </p>
                )
            })}
        </div>
    )
}

export default FileBox
